From 74f7e08811bb69d27e067b46c815f504b8cc8f13 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 23 Jan 2011 12:26:23 -0500 Subject: [PATCH] Add a migration guide section about GdkDrawable https://bugzilla.gnome.org/show_bug.cgi?id=640188 --- docs/reference/gtk/migrating-2to3.xml | 35 ++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/reference/gtk/migrating-2to3.xml b/docs/reference/gtk/migrating-2to3.xml index 6022ce7a1b..40111d0a1a 100644 --- a/docs/reference/gtk/migrating-2to3.xml +++ b/docs/reference/gtk/migrating-2to3.xml @@ -606,6 +606,7 @@ gtk_fixed_get_preferred_height (GtkWidget *widget, find-and-replace task. Please refer to the following table: + GdkRegion to cairo_region_t GDKcairo @@ -697,7 +698,7 @@ g_object_unref (pixbuf);
- Replace colormaps by visuals + Replace GdkColormap by GdkVisual For drawing with cairo, it is not necessary to allocate colors, and a #GdkVisual provides enough information for cairo to handle colors @@ -746,6 +747,38 @@ on_alpha_screen_changed (GtkWindow *window,
+
+ GdkDrawable is gone + + + #GdkDrawable has been removed in GTK+ 3, together with #GdkPixmap + and #GdkImage. The only remaining drawable class is #GdkWindow. + For dealing with image data, you should use cairo surfaces or + #GdkPixbufs. + + + + GdkDrawable functions that are useful with windows have been replaced + by corresponding GdkWindow functions: +
+ GdkDrawable to GdkWindow + + + GDK 2.xGDK 3 + + + gdk_drawable_get_visual()gdk_window_get_visual() + gdk_drawable_get_size()gdk_window_get_width() + gdk_window_get_height() + gdk_pixbuf_get_from_drawable()gdk_pixbuf_get_from_window() + gdk_drawable_get_clip_region()gdk_window_get_clip_region() + gdk_drawable_get_visible_region()gdk_window_get_visible_region() + + +
+ + +
Backend-specific code -- 2.30.2